import java.util.StringTokenizer;

class ICPCP3656_7752 {

    public static void main(String[] args) {
    	
    	while (true) {
    		int n = Integer.parseInt(readLn());
    		
    		if (n == 0) break;
    		
    		process(n);
    	}
    }

    
	private static void process(int n) {
		int maryEvens = 0;
		int maryOdds = 0;
		int johnEvens = 0;
		int johnOdds = 0;
		
		StringTokenizer st = new StringTokenizer(readLn());
		
		for (int k = 0; k < n; k++) {
			int x = Integer.parseInt(st.nextToken());
			
			if (x % 2 == 0) maryEvens++;
			else maryOdds++;
		}
		
		st = new StringTokenizer(readLn());
		
		for (int k = 0; k < n; k++) {
			int x = Integer.parseInt(st.nextToken());
			
			if (x % 2 == 0) johnEvens++;
			else johnOdds++;
		}
		
		int i = johnEvens < maryOdds ? johnEvens : maryOdds;
		int j = johnOdds < maryEvens ? johnOdds : maryEvens;
		
		System.out.println(n - (i + j));
		
	}


	static String readLn() {
        String newLine = System.getProperty("line.separator");
        StringBuffer buffer = new StringBuffer();
        int car = -1;
        try {
            car = System.in.read();
            while ((car > 0) && (car != newLine.charAt(0))) {
                buffer.append((char)car);
                car = System.in.read();
            }
            if (car == newLine.charAt(0))
            System.in.skip(newLine.length() - 1);
        } catch (java.io.IOException e) { return (null);}
        if ((car < 0) && (buffer.length() == 0)) return (null);
        return (buffer.toString()).trim();
    }

}